A Hierarchical Program Representation for Refactoring

نویسندگان

  • Niels Van Eetvelde
  • Dirk Janssens
چکیده

Currently there is a lot of interest in graph representations of software systems, as they provide a natural and flexible means to describe complex structures. The various visual sublanguages of the UML are perhaps the most obvious example of this. In [10] a graph representation of object-oriented programs was presented that enables one to describe refactoring operations (behaviour-preserving changes in the structure of a program) in a formal, concise way by graph rewriting productions. In general, however, a refactoring makes changes to a small part of a program, so the graph representation should only contain the information needed to carry out that refactoring. All other details are redundant and make the graph unnecessarily large for good visualization. A possible solution consists in using a hierarchical representation. Such a representation of object-oriented programs is presented in this paper. It is based on node-rewriting graph productions: each refinement step corresponds to a production. The construction is illustrated by applying it to a small Java simulation of a Local Area Network.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Software Refactoring Approaches: A Survey

The objective of software refactoring is to improve the software product’s quality by improving its performance and understandability. There are also different quality attributes that software refactoring can improve. This study gives a wide overview of five primary approaches to software refactoring. These are two clustering approaches at class level and two at package level, as well as one gr...

متن کامل

Equivalence of Program Dependence Graphs in Refactoring

Program dependence graphs are widely used in computer science for example when performing optimizations, parallelization and as an internal program representation in integrated development environments. In this paper, I will look into the usefulness of program dependence graphs regarding refactoring. Refactoring is a very useful technique to improve the internal structure of a program. Many mod...

متن کامل

Mining of Source Code Concepts and Idioms An Approach based on Clone Detection Techniques

This paper introduces a new view on program source code with a focus on code clone information. An algorithm is presented that transforms source code into an equivalent representation which expresses code redundancies as hierarchical clone classes explicitly. This representation supports program comprehension by pointing out arbitrary programming idioms and the frequencies of their occurrences ...

متن کامل

ormalizing Refactorings ith Graph Transformations

he widespread interest in refactoring —transforming the source-code of an objectriented program without changing its external behaviour— has increased the need or a precise definition of refactoring transformations and their properties. In this aper we explore the use of graph rewriting for specifying refactorings and their effect n programs. We introduce a graph representation for programs and...

متن کامل

Formalising Behaviour Preserving Program Transformations

The notion of refactoring —transforming the source-code of an objectoriented program without changing its external behaviour— has increased the need for a precise definition of refactorings and their properties. This paper introduces a graph representation of those aspects of the source code that should be preserved by a refactoring, and graph rewriting rules as a formal specification for the r...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • Electr. Notes Theor. Comput. Sci.

دوره 82  شماره 

صفحات  -

تاریخ انتشار 2003